package com.hxzy.shop.dto.commodity.resp;

import com.hxzy.shop.entity.ClassifiedManagement;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "分类返回参数")
public class ClassifiedManagementResp extends ClassifiedManagement {

    private static final long serialVersionUID = -8864556265870491556L;
    @ApiModelProperty(name = "drugNum", value = "该分类下所有子分类药品数量")
    private Integer drugNum;
    @ApiModelProperty(name = "subClassified", value = "子分类")
    private List<SubClassified> subClassified;
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SubClassified{
        @ApiModelProperty(name = "id", value = "子分类id")
        private Long id;
        @ApiModelProperty(name = "name", value = "子分类名称")
        private String name;
        @ApiModelProperty(name = "drugNum", value = "该分类下药品数量")
        private Integer drugNum;
    }
}